<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>    

<c:set var="contextPath" value="${pageContext.request.contextPath}" />

<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.1//EN" "http://www.wapforum.org/DTD/xhtml-mobile11.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta name="viewport" content="user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, width=device-width" />
	<link rel="stylesheet" href="${contextPath}/css/common/layout.css" type="text/css" />
	<script type="text/javascript">
		var contextPath = "${contextPath}";
	</script>
	<script type="text/javascript" src="${contextPath}/js/common/lib/jquery-1.6.4.js"></script>
	<script type="text/javascript" src="${contextPath}/js/common/menu.js"></script>
	<link rel="stylesheet" href="${contextPath}/css/etc/used_list.css" type="text/css" />
	<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-32515688-1']); 
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
	<title>인권과 평화의 대학 - 성공회대학교</title>
</head>
<body>

	<jsp:include page="../common/header.jsp" />

	<!-- 컨텐츠 시작 -->	
	<div id="center">
	
		<!-- 공통 네비게이션 -->
		<h2>
			<a class="reg" href="#">판매등록</a>
			<span class="nav_step_3">중고장터</span>   
		</h2>
		<!-- 공통 부분 -->
	
		<ul id="goods_list">
			<c:forEach items="${list}" var="goods">
				<li>
					<a href="${contextPath}/etc/used_view.do?articleNo=${goods.articleNo}&pageNum=${pageNum}">
						<span class="img"><img src="http://cfile21.uf.tistory.com/image/165ACB4B4FA396FD30AD56" alt="" /></span>
						
						<c:choose>
							<c:when test="${goods.type == 1}">
								<span class="title">제목 : [팝니다]${goods.title}</span>
							</c:when>
							<c:when test="${goods.type == 2}">
								<span class="title">제목 : [삽니다]${goods.title}</span>
							</c:when>
							<c:when test="${goods.type == 3}">
								<span class="title">제목 : [무료나눔]${goods.title}</span>
							</c:when>
						</c:choose>
						
						<span class="goods_name">거래물품 : ${goods.goodsName}</span>
						<span class="price">가격 : ${goods.price}</span>
						<span class="writer">등록자 : ${goods.writer}</span>
						<span class="reg_date">등록일 : ${goods.regDate}</span>
					</a>
				</li>		 
			</c:forEach> 
		</ul>
	
				 
		<div id="pagging">
			<a class="first" href="${contextPath}/etc/used_list.do?pageNum=${paggingUtil.first}">
				<img src="${contextPath}/img/common/board/first.gif" alt="첫 페이지" />
			</a>
			<a class="prev" href="${contextPath}/etc/used_list.do?pageNum=${paggingUtil.prev}">
				<img src="${contextPath}/img/common/board/prev.gif" alt="이전 페이지" />
			</a>
			
			<c:forEach begin="${paggingUtil.beginPage}" end="${paggingUtil.endPage}" var="num">
				<c:choose>
					<c:when test="${paggingUtil.curPage == num}">
						<a class="curPage" style="font-weight:bold;" href="${contextPath}/etc/used_list.do?pageNum=${num}">${num}</a>				
					</c:when>
					<c:otherwise>
						<a href="${contextPath}/etc/used_list.do?pageNum=${num}">${num}</a>
					</c:otherwise>
				</c:choose>
			</c:forEach> 
			
			<a class="next" href="${contextPath}/etc/used_list.do?pageNum=${paggingUtil.next}">
				<img src="${contextPath}/img/common/board/next.gif" alt="다음 페이지" />
			</a>
			<a class="last" href="${contextPath}/etc/used_list.do?pageNum=${paggingUtil.last}">
				<img src="${contextPath}/img/common/board/last.gif" alt="마지막 페이지" />
			</a>
		</div> 		 
		
	</div>	
	<!-- 컨텐츠 끝 -->	
	
	<!-- 하단영역 -->
	<jsp:include page="../common/footer.jsp" />
	
			 
</body>
</html>